package com.skyolder.crutch.word.token;

import com.skyolder.crutch.word.types.KeyWordType;

public class KeyWordToken  implements Token{
	private KeyWordType keyWordType;
	public KeyWordToken( KeyWordType keyWordType){
		this.keyWordType= keyWordType;
	}
	public KeyWordType getKeyWordType() {
		return keyWordType;
	}

	public void setKeyWordType(KeyWordType keyWordType) {
		this.keyWordType = keyWordType;
	}
	public String toString(){
		if(keyWordType!=null){
			return keyWordType.toString();
		}
		return "null";
	}
	public boolean isVarType(){
		if(keyWordType==KeyWordType.BOOL){
			return true;
		}
		if(keyWordType==KeyWordType.BYTE){
			return true;
		}
		if(keyWordType==KeyWordType.CHAR){
			return true;
		}
		if(keyWordType==KeyWordType.DOUBLE){
			return true;
		}
		if(keyWordType==KeyWordType.INT){
			return true;
		}
		if(keyWordType==KeyWordType.LONG){
			return true;
		}
		if(keyWordType==KeyWordType.STRING){
			return true;
		}
		return false;
	}
}
